<!-- $Id: wxch_keywords.html 2013-10-16 09:59:06Z djks $ -->

{if $full_page}
{include file="wxch_pageheader.htm"}
{insert_scripts files="../data/static/js/utils.js,./js/listtable.js"}

<div class="form-div">

    <form action="javascript:searchArticle()" name="searchForm" action="" >
        <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />

        管理员名称 <input type="text" name="keyword" id="keyword" />

        <input type="submit" value=" 搜索 " class="button" />

    </form>
</div>



<form method="POST" action="" name="listForm">

    <!-- start cat list -->

    <div class="list-div" id="listDiv">

        {/if}

        <table cellspacing='1' cellpadding='3' id='list-table'>

            <tr>

                <th><a href="#">类型</a></th>

                <th><a href="#">微信昵称</a></th>

                <th><a href="#">openid</a></th>

                <th><a href="#">管理员名称</a></th>

                <th><a href="#">状态</a></th>

                <th>操作</th>

            </tr>

            {foreach from=$wxchdata item=list}

            <tr>

                <td class="first-cell" align="center">

                    <span>{$list.type_name} </span></td>

                <td align="center"><span>{$list.nickname}</span></td>

                <td align="center"><span>{$list.wxid}</span></td>

                <td align="center">{$list.name}</td>

                <td align="center"><span>

    <img src="images/{if $list.autoload eq 1}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_guanli', {$list.aid})" /></span>

                </td>



                <td align="center" nowrap="true"><span>

      <a href="wxch_guanli.php?aid={$list.aid}" title="编辑"><img src="images/icon_edit.gif" border="0" height="16" width="16" /></a>&nbsp;

     <!--  --><a href="javascript:;" onclick="listTable.remove({$list.aid}, '您确认要删除这个提醒吗？')" title="移除"><img src="images/icon_drop.gif" border="0" height="16" width="16"></a><!--  --></span>

                </td>

            </tr>

            {/foreach}

            <tr>&nbsp;

                <td align="right" nowrap="true" colspan="8">

                    <div id="turn-page">

                        总计  <span id="totalRecords">{$filter.record_count}</span>

                        个记录分为 <span id="totalPages">{$filter.page_count}</span>

                        页当前第 <span id="pageCurrent">{$filter.page}</span>

                        页，每页 <input type='text' size='3' name="page_size" id='pageSize' value="{$filter.page_size}" onkeypress="return listTable.changePageSize(event)" />

        <span id="page-link">
          <a href="javascript:listTable.gotoPageFirst()">第一页</a>

          <a href="javascript:listTable.gotoPagePrev()">上一页</a>

          <a href="javascript:listTable.gotoPageNext()">下一页</a>

          <a href="javascript:listTable.gotoPageLast()">最末页</a>

          <select id="gotoPage" onchange="listTable.gotoPage(this.value)">

              {create_pages count=$filter.page_count page=$filter.page}
          </select>

                    </div>

                </td>

            </tr>

        </table>



        {if $full_page}

    </div>

</form>

<!-- end cat list -->

<script type="text/javascript" language="JavaScript">

    listTable.recordCount = {$filter.record_count};

    listTable.pageCount = {$filter.page_count};

    var page_size   = {$filter.page_size};



    listTable.filter.type = '{$filter.type}';

    listTable.filter.pagesize = '{$filter.page_size}';

    listTable.filter.record_count = '{$filter.record_count}';

    listTable.filter.page = '{$filter.page}';

    listTable.filter.page_count = '{$filter.record_count}';

    listTable.filter.start = '{$filter.start}';





    onload = function()

    {

        // 开始检查订单

        startCheckOrder();

    }

    /**

     * @param: bool ext 其他条件：用于转移分类

     */

    function confirmSubmit(frm, ext)

    {

        if (frm.elements['type'].value == 'button_remove')

        {

            return confirm(drop_confirm);

        }

        else if (frm.elements['type'].value == 'not_on_sale')

        {

            return confirm(batch_no_on_sale);

        }

        else if (frm.elements['type'].value == 'move_to')

        {

            ext = (ext == undefined) ? true : ext;

            return ext && frm.elements['target_cat'].value != 0;

        }

        else if (frm.elements['type'].value == '')

        {

            return false;

        }

        else

        {

            return true;

        }

    }

    function changeAction()

    {



        var frm = document.forms['listForm'];



        // 切换分类列表的显示

        frm.elements['target_cat'].style.display = frm.elements['type'].value == 'move_to' ? '' : 'none';



        if (!document.getElementById('btnSubmit').disabled &&

                confirmSubmit(frm, false))

        {

            frm.submit();

        }

    }



    /* 搜索规则 */

    function searchArticle()

    {

        listTable.filter.keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);

        listTable.filter.page = 1;

        listTable.filter.type = '{$filter.type}';

        listTable.filter.goto = 'search';

        listTable.loadList();

    }





</script>

{include file="wxch_pagefooter.htm"}

{/if}